package com.orm;

import javax.persistence.*;
import javax.persistence.Entity;

/**
 * Created by lirance on 16/5/10.
 */
@Entity
@Table(name = "webService", schema = "", catalog = "ServiceRecommendationSystem")
public class WebServiceEntity extends com.orm.Entity{
    private int wsId;
    private String wsAddress;
    private String wsName;
    private String proName;
    private String location;
    private String clusteNum;
    private String clusteNam;

    @Id
    @Column(name = "wsId", nullable = false, insertable = true, updatable = true)
    public int getWsId() {
        return wsId;
    }

    public void setWsId(int wsId) {
        this.wsId = wsId;
    }

    @Basic
    @Column(name = "wsAddress", nullable = false, insertable = true, updatable = true, length = 255)
    public String getWsAddress() {
        return wsAddress;
    }

    public void setWsAddress(String wsAddress) {
        this.wsAddress = wsAddress;
    }

    @Basic
    @Column(name = "wsName", nullable = false, insertable = true, updatable = true, length = 255)
    public String getWsName() {
        return wsName;
    }

    public void setWsName(String wsName) {
        this.wsName = wsName;
    }

    @Basic
    @Column(name = "proName", nullable = true, insertable = true, updatable = true, length = 255)
    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    @Basic
    @Column(name = "location", nullable = true, insertable = true, updatable = true, length = 255)
    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Basic
    @Column(name = "clusteNum", nullable = true, insertable = true, updatable = true, length = 20)
    public String getClusteNum() {
        return clusteNum;
    }

    public void setClusteNum(String clusteNum) {
        this.clusteNum = clusteNum;
    }

    @Basic
    @Column(name = "clusteNam", nullable = true, insertable = true, updatable = true, length = 20)
    public String getClusteNam() {
        return clusteNam;
    }

    public void setClusteNam(String clusteNam) {
        this.clusteNam = clusteNam;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WebServiceEntity that = (WebServiceEntity) o;

        if (wsId != that.wsId) return false;
        if (wsAddress != null ? !wsAddress.equals(that.wsAddress) : that.wsAddress != null) return false;
        if (wsName != null ? !wsName.equals(that.wsName) : that.wsName != null) return false;
        if (proName != null ? !proName.equals(that.proName) : that.proName != null) return false;
        if (location != null ? !location.equals(that.location) : that.location != null) return false;
        if (clusteNum != null ? !clusteNum.equals(that.clusteNum) : that.clusteNum != null) return false;
        if (clusteNam != null ? !clusteNam.equals(that.clusteNam) : that.clusteNam != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = wsId;
        result = 31 * result + (wsAddress != null ? wsAddress.hashCode() : 0);
        result = 31 * result + (wsName != null ? wsName.hashCode() : 0);
        result = 31 * result + (proName != null ? proName.hashCode() : 0);
        result = 31 * result + (location != null ? location.hashCode() : 0);
        result = 31 * result + (clusteNum != null ? clusteNum.hashCode() : 0);
        result = 31 * result + (clusteNam != null ? clusteNam.hashCode() : 0);
        return result;
    }
}
